package com.music.glide.load.engine.bitmap_recycle

import java.util.TreeMap

class KPrettyPrintTreeMap<K, V> : TreeMap<K, V>() {
    override fun toString(): String {
        val sb = StringBuilder()
        sb.append("(")
        entries.forEach {
            sb.append("{").append(it.key).append(":").append(it.value).append("}, ")
        }
        if (isNotEmpty()) {
            sb.replace(sb.length - 2, sb.length,"")
        }
        sb.append(")")
        return sb.toString()
    }
}